Optimal. Leaf size=45 \[ -2 p x+\frac {2 \sqrt {a} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+x \log \left (c \left (a+b x^2\right )^p\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2498, 327, 211}
\begin {gather*} \frac {2 \sqrt {a} p \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+x \log \left (c \left (a+b x^2\right )^p\right )-2 p x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 327
Rule 2498
Rubi steps
\begin {align*} \int \log \left (c \left (a+b x^2\right )^p\right ) \, dx &=x \log \left (c \left (a+b x^2\right )^p\right )-(2 b p) \int \frac {x^2}{a+b x^2} \, dx\\ &=-2 p x+x \log \left (c \left (a+b x^2\right )^p\right )+(2 a p) \int \frac {1}{a+b x^2} \, dx\\ &=-2 p x+\frac {2 \sqrt {a} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+x \log \left (c \left (a+b x^2\right )^p\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 45, normalized size = 1.00 \begin {gather*} -2 p x+\frac {2 \sqrt {a} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+x \log \left (c \left (a+b x^2\right )^p\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 46, normalized size = 1.02
method | result | size |
default | \(x \ln \left (c \left (b \,x^{2}+a \right )^{p}\right )-2 p b \left (\frac {x}{b}-\frac {a \arctan \left (\frac {b x}{\sqrt {b a}}\right )}{b \sqrt {b a}}\right )\) | \(46\) |
risch | \(x \ln \left (\left (b \,x^{2}+a \right )^{p}\right )+\frac {i \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{2} \mathrm {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) x \pi }{2}-\frac {i \pi x \,\mathrm {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \right )}{2}-\frac {i \pi x \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{3}}{2}+\frac {i \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{2} x \pi }{2}-\frac {\sqrt {-b a}\, p \ln \left (\sqrt {-b a}\, x +a \right )}{b}+x \ln \left (c \right )+\frac {\sqrt {-b a}\, p \ln \left (-\sqrt {-b a}\, x +a \right )}{b}-2 p x\) | \(186\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 45, normalized size = 1.00 \begin {gather*} 2 \, b p {\left (\frac {a \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b} - \frac {x}{b}\right )} + x \log \left ({\left (b x^{2} + a\right )}^{p} c\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 107, normalized size = 2.38 \begin {gather*} \left [p x \log \left (b x^{2} + a\right ) + p \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} + 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) - 2 \, p x + x \log \left (c\right ), p x \log \left (b x^{2} + a\right ) + 2 \, p \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) - 2 \, p x + x \log \left (c\right )\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 100 vs.
\(2 (44) = 88\).
time = 2.17, size = 100, normalized size = 2.22 \begin {gather*} \begin {cases} x \log {\left (0^{p} c \right )} & \text {for}\: a = 0 \wedge b = 0 \\x \log {\left (a^{p} c \right )} & \text {for}\: b = 0 \\- 2 p x + x \log {\left (c \left (b x^{2}\right )^{p} \right )} & \text {for}\: a = 0 \\\frac {2 a p \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{b \sqrt {- \frac {a}{b}}} - \frac {a \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{b \sqrt {- \frac {a}{b}}} - 2 p x + x \log {\left (c \left (a + b x^{2}\right )^{p} \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.19, size = 41, normalized size = 0.91 \begin {gather*} p x \log \left (b x^{2} + a\right ) + \frac {2 \, a p \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}} - {\left (2 \, p - \log \left (c\right )\right )} x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.22, size = 37, normalized size = 0.82 \begin {gather*} x\,\ln \left (c\,{\left (b\,x^2+a\right )}^p\right )-2\,p\,x+\frac {2\,\sqrt {a}\,p\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________